        </div>
      </div>
    </dis>
      
      <!-- 辅助元素，一般用于移动设备下遮罩 -->
      <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
  </div>

<script src="/static/layui/layui.js"></script>
<script>
layui.use(['element','layer','form','laydate'], function(){
  var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
  var layer = layui.layer;//layer弹出层
  var form = layui.form;
  var laydate = layui.laydate;//日期
});

/*data_name值的命名‘-’之前代表1级之后代表2级*/
function leftnav(data_name,url){
    window.location.href=url+"?nav="+data_name;
}
function out(){
   layer.load();
    $.post("{:url('Index/out')}",{},function(res){
      layer.closeAll('loading');
      layer.msg(res.msg,{
          time: 1500 
      }, function(){
        window.location.href="/admin/index/login.html";
      });
    })
}
/*修改密码的弹出框*/
function change_pwd_alert(){
  layer.load();
  layer.open({
    type: 1,
    title: false,
    closeBtn: 0,
    shadeClose: true,
    skin: 'yourclass',
    content: '<div class="layui-card-header">修改密码</div><div class="layui-card-body" pad15> <div class="layui-form" lay-filter=""><div class="layui-form-item"><label class="layui-form-label">当前密码</label><div class="layui-input-inline"><input type="password" name="oldPassword" lay-verify="required" lay-verType="tips" class="layui-input"></div></div><div class="layui-form-item"><label class="layui-form-label">新密码</label><div class="layui-input-inline"><input type="password" name="password" lay-verify="pass" lay-verType="tips" autocomplete="off" id="LAY_password" class="layui-input"></div></div><div class="layui-form-item"><label class="layui-form-label">确认新密码</label><div class="layui-input-inline"><input type="password" name="repassword" lay-verify="repass" lay-verType="tips" autocomplete="off" class="layui-input"></div> </div><div class="layui-form-item"><div class="layui-input-block"><button class="layui-btn" lay-submit lay-filter="setmypass" onclick="EtidPwd()">确认修改</button></div></div></div></div>'
  });
  layer.closeAll('loading');
}
/*执行修改密码*/
function EtidPwd(){
  layer.load();
  var oldPassword=$.trim($("input[name='oldPassword']").val());
  var password=$.trim($("input[name='password']").val());
  var repassword=$.trim($("input[name='repassword']").val());
  if(oldPassword==''){
     layer.closeAll('loading');
     layer.msg('请输入原密码');
     return false;
  }
  if(password==''){
     layer.closeAll('loading');
     layer.msg('请输入新密码');
     return false;
  }
  if(repassword==''){
     layer.closeAll('loading');
     layer.msg('请输入确认密码');
     return false;
  }
  if(password!=repassword){
     layer.closeAll('loading');
     layer.msg('两次密码不一致');
     return false;
  }
  $.post("{:url('Index/EtidPwd')}",{oldPassword:oldPassword,password:password,repassword:repassword},function(res){
        if(res.status=='0'){
          layer.closeAll('loading');
          layer.msg(res.msg);
        }
        if(res.status=='1'){
          layer.msg(res.msg,{
            time: 1500 
          }, function(){
            layer.closeAll();
          });
        }
  })
}
</script>
</body>
</html>